Attribute VB_Name = "Declarations"
Option Explicit

'API declarations
Public Type POINTAPI
    X As Long
    Y As Long
End Type
Public Enum ETOFlags
    ETO_NONE = 0
    ETO_GRAYED = 1
    ETO_OPAQUE = 2
    ETO_CLIPPED = 4
End Enum
Public Enum TAFlags
    TA_NOUPDATECP = 0
    TA_UPDATECP = 1
    TA_LEFT = 0
    TA_RIGHT = 2
    TA_CENTER = 6
    TA_TOP = 0
    TA_BOTTOM = 8
    TA_BASELINE = 24
End Enum
Public Declare Function MoveToEx Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long, Optional ByVal lpPoint As Long = 0) As Long
Public Declare Function LineTo Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long) As Long
Public Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long
Public Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hDC As Long) As Long
Public Declare Function HideCaret Lib "user32" (ByVal hWnd As Long) As Long
Public Declare Function ShowCaret Lib "user32" (ByVal hWnd As Long) As Long
Public Declare Function SetCaretPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long
Public Declare Function GetCaretPos Lib "user32" (lpPoint As POINTAPI) As Long
Public Declare Function CreateCaret Lib "user32" (ByVal hWnd As Long, ByVal hBitmap As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
Public Declare Function DestroyCaret Lib "user32" () As Long
Public Declare Function IntersectRect Lib "user32" (lpDestRect As RECT, lpSrc1Rect As RECT, lpSrc2Rect As RECT) As Long
Public Const WM_KEYDOWN As Long = &H100
Public Const WM_SETFOCUS As Long = &H7
Public Const WM_KILLFOCUS As Long = &H8
Public Declare Function GetTextExtentExPointA Lib "gdi32" (ByVal hDC As Long, ByVal lpszStr As String, ByVal cchString As Long, ByVal nMaxExtent As Long, lpnFit As Long, alpDx As Long, lpSize As Size) As Long
Public Declare Function GetTextExtentExPointW Lib "gdi32" (ByVal hDC As Long, ByVal lpszStr As Long, ByVal cchString As Long, ByVal nMaxExtent As Long, lpnFit As Long, alpDx As Long, lpSize As Size) As Long
Public Declare Function GetTextExtentPoint32W Lib "gdi32" (ByVal hDC As Long, ByVal lpsz As Long, ByVal cbString As Long, lpSize As Size) As Long
Public Declare Function SelectObject Lib "gdi32" (ByVal hDC As Long, ByVal hObject As Long) As Long
Public Declare Function ExtTextOutW Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long, ByVal wOptions As ETOFlags, lpRect As RECT, ByVal lpString As Long, ByVal nCount As Long, Optional ByVal lpDx As Long = 0) As Long
Public Declare Function SetTextAlign Lib "gdi32" (ByVal hDC As Long, ByVal wFlags As TAFlags) As Long
Public Declare Function GetTextAlign Lib "gdi32" (ByVal hDC As Long) As TAFlags
Public Declare Function SetTextColor Lib "gdi32" (ByVal hDC As Long, ByVal crColor As Long) As Long
Public Declare Function SetBkColor Lib "gdi32" (ByVal hDC As Long, ByVal crColor As Long) As Long
Public Declare Function SetBkMode Lib "gdi32" (ByVal hDC As Long, ByVal iBkMode As Long) As Long
Public Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
Public Const SysColorBit As Long = &H80000000
Public Const SysColorMask As Long = Not SysColorBit
Public Const APITRANSPARENT As Long = 1
Public Const APIOPAQUE As Long = 2

